package com.msw.axon.model.optimize;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

@Entity
@Table(name = "",
        uniqueConstraints = @UniqueConstraint(columnNames = { "name" }))
public class Role {

    @Id
    private String id;

    @Column
    private String name;

    //@Enumerated
    //private DomainLevel domainLevel;

    @ManyToMany
    @JoinTable(name = "",
            joinColumns = {
                    @JoinColumn(name = "roles", referencedColumnName = "id") },
            inverseJoinColumns = { @JoinColumn(name = "accounts",
                    referencedColumnName = "id") })
    private Set<Account> accounts = new HashSet<>();

    //@ManyToMany
    //private Set<Page> pages = new HashSet<>();
}